package com.botann.projects.base;

/**
 * jiyi
 * UserDetailEnum
 * Created by 刘山国 on 2019/9/16.
 * Copyright (c) 2017 伯坦科技. All rights reserved
 */
public enum UserDetailType {
    // 管理员0 , 1 APP用户
    USER_ADMIN(0),
    USER(1);

    private int num;
    UserDetailType(int num) {
        this.num = num;
    }

    public int rawValue(){
        return this.num;
    }

    public static UserDetailType rawWith(int num) {
        for (UserDetailType any: values()){
            if (any.rawValue() == num) return any;
        }
        return USER_ADMIN;
    }
}
